import React from 'react';
import * as echarts from 'echarts';



function Two(props) {

    setTimeout(() => {
        var chartDom = document.getElementById('main3');
var myChart = echarts.init(chartDom);
var option;

option = {
    title: {
        text: '新增用户 ',
      },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      crossStyle: {
        color: '#999'
      }
    }
  },
  toolbox: {
    feature: {
      dataView: { show: true, readOnly: false },
      magicType: { show: true, type: ['line', 'bar'] },
      restore: { show: true },
      saveAsImage: { show: true }
    }
  },
  legend: {

    data: ['用户', '访问量']
  },
  xAxis: [
    {
      type: 'category',
      data: ['1月', '2月', '3月', '4月', '5月', '6月'],
      axisPointer: {
        type: 'shadow'
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      name: '最近十天',
      min: 0,
      max: 250,
      interval: 50,
  
    },
    
  ],
  series: [
    {
      name: '用户',
      type: 'bar',
   
      data: [
        60.0,99, 162.2, 23.2, 160, 76.7, 135.6, 162.2,  135.6, 60, 260.2, 3.3
      ]
    },
    {
      name: '访问量',
      type: 'bar',
      
      data: [
        80.0, 99,162.2, 260.2, 260.2, 162.2, 175.6, 182.2, 260.2, 18.8,  135.6 , 260.2
      ]
    }
    
  ]
};

option && myChart.setOption(option);

    }, 200);
    
    return (
        <div>
            <div id="main2" style={{width:400,height:250}}></div>
            
        </div>
    );
}

export default Two;